package com.example.hms.controller;

import com.example.hms.service.DashboardService;
import com.example.hms.service.RoomService;
import com.example.hms.util.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RequestMapping("/dashboard")
@RestController
public class DashboardController {
    @Resource
    private DashboardService dashboardService;

    @RequestMapping(value = "/selectRoomNumber",method = RequestMethod.GET)
    public Result selectRoomNumber() {
        return dashboardService.selectRoomNumber();
    }

    @RequestMapping(value = "/selectLiveNumber",method = RequestMethod.GET)
    public Result selectLiveNumber() {
        return dashboardService.selectLiveNumber();
    }

    @RequestMapping(value = "/selectRevenue",method = RequestMethod.GET)
    public Result selectRevenue(String month) {
        return dashboardService.selectRevenue(month);
    }

    @RequestMapping(value = "/selectRevenueByMonth",method = RequestMethod.GET)
    public Result selectRevenueByMonth(String month) {return dashboardService.selectRevenueByMonth(month);}
}
